$INCLUDE: 'C:\FG\FASTGRAF.FI'

      PROGRAM MAIN

      INTEGER*1 TRIANGLE(25)
      INTEGER OLD_MODE
      INTEGER FG_GETMODE, FG_TESTMODE

      DATA TRIANGLE /
     +   #11,#11,#11,#11,#10,
     +   #01,#22,#22,#21,#00,
     +   #00,#12,#22,#10,#00,
     +   #00,#01,#21,#00,#00,
     +   #00,#00,#10,#00,#00/

      CALL FG_INITPM
      IF (FG_TESTMODE(13,1) .EQ. 0) THEN
         STOP 'This program requires a 320 x 200 EGA graphics mode.'
      END IF

      OLD_MODE = FG_GETMODE()
      CALL FG_SETMODE(13)

      CALL FG_SETCOLOR(7)
      CALL FG_RECT(0,319,0,199)

      CALL FG_MOVE(156,101)
      CALL FG_DRWIMAGE(TRIANGLE,5,5)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
